
import axios from 'axios';

export default {
	install:function(Vue){
		Vue.filter('formattingTime', function (value) {
        var t,y,m,d,h,i,s;  
        t = new Date(value);  
        y = t.getFullYear()||"0000";  
        m = t.getMonth()+1||"00";  
        d = t.getDate()||"00";  
        h = t.getHours()||"00";  
        i = t.getMinutes()||"00";  
        s = t.getSeconds()||"00";  
        if(y=="0000"){return "0s"}else{
          return y+'-'+(m)+'-'+(d)
          //' '+(h)+':'+(i)+':'+(s);
        }
        })
        Vue.filter('noValueFilter',function(value){
			let val = '';
			if(value){val=value}else{val='暂无'};
			return val;
		})
        Vue.filter('isLeader',function(value){
            let val = '';
            if(value===0){val='否'}else{val='是'};
            return val;
        })
	}
}